package pailaidai.hc.com.mysvgdemo.event;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.LinearLayout;

import pailaidai.hc.com.mysvgdemo.R;

/**
 * Created by Administrator on 2018/3/16.
 */

public class EventActivity  extends Activity{
   private LinearLayout event_ly;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.event_layout);
        initView();
        initData();
    }
    private void initView() {
        event_ly=findViewById(R.id.event_ly);
        event_ly.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View view, MotionEvent motionEvent) {
             switch (motionEvent.getAction()){
                 case MotionEvent.ACTION_DOWN:
                     Log.e("ssssssssssssssssssss1","ACTION_DOWN");
                     break;
                 case MotionEvent.ACTION_HOVER_MOVE:
                     Log.e("ssssssssssssssssssss1","ACTION_HOVER_MOVE");
                     break;
                 case MotionEvent.ACTION_UP:
                     Log.e("ssssssssssssssssssss1","ACTION_UP");
                     break;
             }

                return true;
            }
        });


    }
    private void initData() {

    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        Log.e("ssssssssssssssssssss222","onTouchEvent");
        return super.onTouchEvent(event);
    }
}
